package com.frejoys.common.error;

import com.frejoys.common.response.RestultVo;

public enum HttpStatus implements RestultVo {
    systemError(-1, "系统异常"),

    success(200, "ok"),
    fail(201, "fail"),

    notifyFail(500,"回调失败"),
    routeFail(599, "非法访问 - 私有接口路由错误"),
    argumentNotValid(600, "参数错误"),
    reqMethod(601, "请求方式不支持"),
    reqClientFailure(602, "请求失败"),
    reqNoBody(603, "无请求内容"),
    beingProcessed(604, "处理中"),
    paramValueError(605, "参数值不存在"),
    routeMediaTypeFail(606, "非法访问 - 不支持请求中的媒体类型"),
    routeRuleNone(607, "无权限 - 无权限访问"),
    wxLoginFail(609, "微信登录失败 - 非法访问"),
    adminRoleFail(610, "非管理员 - 非法访问"),
    siteTypeError(611, "来源非法"),


    headParmError(1000, "请求头参数错误"),
    headSignCacheExist(1001, "请求头签名缓存存在，只能用一次，签名失效"),
    headTimeout(1002, "请求头时间超时"),
    headSignFailure(1003, "请求头签名错误"),
    tokenNoExist(1004, "Token不存在"),
    tokenExpire(1005, "Token失效"),
    tokenVerifyFailure(1006, "Token验证失败"),
    tokenInfoError(1007, "Token信息错误"),
    tokenNoFind(1008, "Token未找到"),
    tokenDiff(1009, "Token不相同，非法访问"),
    bodyParseError(1010, "请求体解析错误"),

    invalidCode(1011, "code不可用"),

    invalidRefreshToken(1012, "refresh_token不可用"),

    invalidOpenid(1013, "openid不可用"),
    fileNoExist(2000, "文件不存在"),
    fileBig(2001, "文件过大"),
    fileNoType(2002, "不支持此类型文件"),

    uploadSiteNoExist(2010, "上传位置不存在"),
    uploadPolicyFileFail(2011, "上传文件失败"),
    uploadCallbackFileFail(2012, "上传文件失败"),
    uploadCallbackTokenNoExist(2013, "Token不存在"),
    uploadCallbackFnameError(2014, "数据错误"),


    codeAlreadySend(2100, "验证码已发送"),
    codeOutLimit(2101, "验证码发送超过限制，请稍后再试"),
    phoneNetworkBusy(2102, "网络繁忙"), // 黑名单
    emailNetworkBusy(2103, "网络繁忙"), // 黑名单
    ipNetworkBusy(2104, "网络繁忙"), // 黑名单
    codeVerifyError(2105, "验证码错误"),
    codeSendError(2106, "验证码发送失败"),
    codeSendExceptionError(2107, "验证码发送失败 - 异常失败"),


    phoneLengthError(3000, "号码长度错误"),
    phoneError(3001, "号码不正确"),
    passwordLengthError(3002, "密码长度 6 - 12 之间"),
    codeLengthVerifyError(3003, "验证码长度错误"),


    accountDisable(4001, "网络异常，请稍后重试 - 用户已经被禁止登录"),
    passwordError(4002, "账户或密码错误 - 密码错误"),
    wxLoginError(4003, "微信登录失败"),
    userNoExist(4004, "账户或密码错误 - 未找到用户"),
    passwordLoginError(4005, "账户或密码错误 - 密码错误"),
    userStatusLoginError(4006, "账户或密码错误 - 用户已经被禁止登录"),
    passwordNumError(4007, "账户或密码错误 - 密码错误次数超过限制"),



    ruleAlreadyExist(5000, "路由地址已存在"),

    wechatPayError(6000,"微信支付失败"),
    notifyError(6001,"支付回调失败！"),
    addressError(6002,"地址不能超过10条！"),
    addressNoExist(6003,"收货地址不存在"),
    goodsNoExist(6004,"未找到商品"),
    goodsCountNotEnough(6005,"商品库存不足"),
    wechatOpenIdNoExist(6006,"用户openid不存在"),
    goodsIsExist(6007,"商品已存在"),
    orderNoExist(6008,"未找到订单"),
    orderFinish(6009,"交易已完成"),
    orderIsScore(6010,"订单已转积分"),
    orderRefundError(6011,"退款失败"),
    orderRefundWxPayError(6012,"退款失败"),
    orderWechatSelectError(6013,"微信查询订单失败"),
    orderRefunding(6014,"退款中"),
    orderRefund(6015,"已退款"),
    orderNoPay(6016,"未支付"),
    orderExpire(6017,"订单失效"),
    orderInfoError(6018,"订单信息错误"),
    orderVerifyError(6019,"订单核销中"),
    orderToScoreError(6020,"转积分失败"),
    orderVerifyExistError(6021,"订单已返利"),
    orderVerifyFail(6022,"订单核销失败"),
    orderSnError(6023,"订单错误"),
    activityMoneyLack(6024,"金额不足"),
    activityQueueError(6025,"更新排队队列为积分失败"),
    taskActivityQueueError(6026,"更新排队队列为返利失败"),
    taskUpRebateMoneyError(6027,"更新订单返利金额失败"),
    taskUpverifyError(6028,"更新订单核销状态失败"),
    taskActivityQueueMoneyError(6029,"更新活动队列返利金额失败"),
    taskStoreActivityMoneyError(6030,"更新店铺活动返利金额失败"),
    orderPayMoneyError(6031,"金额错误"),
    orderAlipaySelectError(6032,"支付宝查询订单失败"),
    orderRefundAliPayError(6033,"退款失败"),
    orderbeingProcessed(6034,"处理中，请稍候"),
    orderSettlementFail(6035,"订单结算失败"),
    orderAwaitVerifyError(6036,"订单待核销"),
    activityQueueNonentity(6037,"活动队列不存在"),



    verifyPendingError(7000,"审核记录已存在且未通过"),
    agentPendingError(7001,"代理人还未审核"),
    invalidVerifyError(7002,"审核无效"),
    storeIsNotOnSaleGoodsOnFail(7003,"店铺未上架,商品上架失败"),
    storeIsNotOnSaleActivityOnFail(7004,"店铺未上架,活动上架失败"),

    storeStatusIsFail(7005,"店铺状态不正确"),

    storeHasGoodsOnSale(7006,"店铺存在未下架的商品，下架失败"),
    storeHasActivityOnSale(7007,"店铺有正在进行的活动，下架失败"),

    alreadyOnSaleError(7008,"已上架,无法提交上架申请"),
    soldOutApplyError(7009,"已下架,无法提交下架申请"),

    scanStoreNotFound(7999,"扫码核销 - 店铺不存在"),
    storeNotFound(8000,"店铺不存在"),


    onSaleEditError(8001,"申请中或已上架状态时无法修改"),
    agentUserError(8002,"代理用户不存在"),

    storeActivityHasExit(8003,"该时段已存在上架中或已上架的活动"),
    storeCodeTypeHasExit(8004,"该类型支付码已存在"),

    goodsNotFound(8100,"商品不存在"),
    auditNotPassError(8101,"审核还未通过"),
    gainUserError(8102,"获取用户信息异常"),
    agentError(8103,"代理人不存在"),
    agentNotNullError(8104,"代理人不能为空"),
    repetitionStoreError(8105,"商家用户已存在"),

    activityNotFound(8106,"活动不存在"),

    applyPendingError(8107,"审核还未结束,无法下架"),
    storeIsDown(8108,"店铺已下架"),
    storeStatusError(8109,"店铺状态异常"),
    storeUserCashError(8110,"商家用户提现申请非法"),
    cashMoneyError(8111,"满10元可提现"),
    totalRatioError(8112,"分销比例在0 - 100之间"),
    sameNameIsExit(8113,"已存在相同名称的店铺类目"),
    categoryHasGoods(8114,"该类目下存在商品"),
    notStoreCategoryError(8115,"负责的店铺下不存在该分类"),


    extendUserNoExist(9001,"推广人不存在"),
    userIsPromotionExist(9002,"已经是达人"),
    extendUserLoginError(9003,"推广人被禁止登录"),
    applyError(9004,"非法申请"),
    isApplyStoreEnter(9005,"用户已申请商家入驻"),
    moneyCashExist(9006,"已提现"),
    extendUserError(9007,"非法推广"),

    userIsAgentExist(9008,"已经是代理"),
    userPromotionExistExist(9009,"被推广者是达人,无法扫码推广"),
    userStoreExistExist(9010,"被推广者是商家,无法扫码推广"),

    sotreRoleNoExist(10000,"仅支持商家用户，请到商家入驻提交信息"),
    agentRoleExist(10001,"代理角色已存在"),
    agentRoleGroupExist(10002,"代理角色组已存在"),
    agentRoleNoExist(10003,"代理角色不存在"),
    agentRoleHasGroup(10004,"代理角色已存在所属组"),
    agentUserHasGroup(10005,"代理用户已存在组"),
    removeGroupFail(10006,"代理组钱包已存在,禁止删除"),
    soldOutError(10007,"店铺还存在上架商品,禁止删除"),
    repetitionError(10008,"重复申请商家入驻"),
    agentStoreNoExist(10009,"代理店铺不存在"),
    agentStoreUserError(10011,"代理服务商家用户不存在"),
    storeEnterError(10012,"商家入驻信息不存在"),
    notCommonIdError(10013,"驳回原因未填写"),
    underReview(10014,"商家入驻审核中无法修改"),
    notNormalUserError(10015,"商家不能进行商家入驻"),
    notAdminVerifyError(10016,"审核信息不存在"),
    rebateMaxMoneyError(10017,"返利最大单笔金额限制不能小于等于0"),
    onlyEqualPath(10018,"仅支持相同层级排序"),
    rebateRatioError(10019,"比例设置错误"),
    maximumError(10020,"支付码生成批次最大限制不能超过1000"),
    minimumError(10021,"支付码生成批次不能小于1"),
    notStoreCodeError(10022,"支付二维码不存在"),
    alreadyStoreCodeError(10023,"支付码二维码已经被其他店铺绑定"),
    notWxImgError(10024,"微信收款码不能为空"),
    notUserNameError(10025,"姓名不能为空"),
    notUserCashError(10026,"提现账号不能为空"),
    notAccountError(10027,"账号不能为空"),
    categoryNotExceedTwenty(10028,"最多添加20种类型"),
    codeError(10029,"支付码错误，未绑定商家"),
    existAgentUserIdError(10030,"职位存在代理人，请先移除代理人"),
    existAgentRoleGroupError(10031,"职位存在代理小组，请先删除代理小组"),
    shouldNotAlError(10032,"微信收款不能填写支付宝信息,请上传微信收款码"),
    shouldNotWxError(10033,"支付宝收款不能上传微信收款码,请填写支付宝信息"),
    agentUserIdError(10034,"代理人已经是其他组管理人"),
    userCodeError(10035,"邀请码错误"),
    notUserError(10036,"用户不存在"),
    userLevelError(10037,"已经关联用户"),
    notCodeError(10038,"邀请码生成失败，请重新申请"),
    notOwnRelevancyError(10039,"无法与自己关联"),
    notAgentError(10040,"你还不是代理，无法转入余额，请先成为代理"),
    notPromotionError(10041,"你还不是达人，无法转入余额，请先成为达人"),
    filtrationOutOfRangeError(10042,"只能筛选3个月的订单，筛选范围过大"),
    filtrationSaleError(10043,"只能筛选3个月的销售记录，筛选范围过大"),
    shiftToMoneyError(10044,"转入金额必须大于0"),

    ratioError(10045,"分成比例设置错误，总分成比例不能大于100"),
    anOrderError(10046,"至少需要一个上架商品才能上架店铺"),
    anStoreActivityError(10047,"至少需要一个有效的上架活动才能上架店铺"),
    soldOutOrderError(10048,"店铺至少需要有一个上架商品，请先下架店铺"),
    soldOutStoreActivityError(10049,"店铺至少需要有一个上架活动，请先下架店铺"),
    startRatioGreaterThanEndRatioError(10050,"比例设置错误，起始比例不能大于结束比例"),
    startRatioAndEndRatioError(10051,"比例设置错误，起始比例或结束比例不能小于1 大于100"),
    deleteWalletLogError(10052,"删除钱包日志失败"),
    updateOrderStatusError(10053,"更新订单状态失败"),
    outOfRangeError(10054,"比例设置错误，起始比例或结束比例不能小于0 大于100"),
    authGroupAccessDelError(10055,"删除失败，该权限使用中，请先清除管理员权限"),
    notCashPasswordError(10056,"未添加提现账号信息密码"),
    cashPasswordError(10057,"密码错误");


    private Integer code;

    private String msg;

    HttpStatus(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    @Override
    public Integer getCode() {
        return this.code;
    }

    @Override
    public String getMsg() {
        return this.msg;
    }

}
